package se.kth.ict.id2203.assignment3b;

import se.sics.kompics.launch.Scenario;
import se.sics.kompics.launch.Topology;

@SuppressWarnings("serial")
public final class Assignment3bExecutor {

	public static final void main(String[] args) {

		/*
		 * specify the topology and the characteristics of the network
		 * connecting the processes
		 */
		Topology topology1 = new Topology() {
			{
				node(1, "127.0.0.1", 22031);
				node(2, "127.0.0.1", 22032);
				node(3, "127.0.0.1", 22033);
				
				link(1, 2, 1000, 0).bidirectional();
				link(1, 3, 2000, 0).bidirectional();
				link(2, 3, 1750, 0).bidirectional();
			}
		};


		Scenario scenario1 = new Scenario(Assignment3bMain.class) {
			{
				command(1, "S500:W8,1:R8:S500:R8:S8000");
				command(2, "S500:W8,2:R8:S500:R8:S8000", 100);
				command(3, "S500:W8,3:R8:S500:R8:S8000", 200);
				
				
				
				
				
				
				//command(4, "S200");
			}
		};

		/*
		 * the launcher will check automatically that topology1 is fully connected
		 */
		scenario1.executeOnFullyConnected(topology1);
		
		System.exit(0);

	}
}
